import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';

@Component({
  selector: 'app-tree-select-basic-demo',
  standalone: true,
  imports: [NzTreeSelectModule, FormsModule],
  templateUrl: './tree-select-basic-demo.component.html',
  styleUrl: './tree-select-basic-demo.component.less',
})
export class TreeSelectBasicDemoComponent {
  value = '';
  nodes = [
    {
      title: 'parent 1',
      key: '100',
      children: [
        {
          title: 'parent 1-0',
          key: '1001',
          children: [
            { title: 'leaf 1-0-0', key: '10010', isLeaf: true },
            { title: 'leaf 1-0-1', key: '10011', isLeaf: true },
          ],
        },
        {
          title: 'parent 1-1',
          key: '1002',
          children: [{ title: 'leaf 1-1-0', key: '10020', isLeaf: true }],
        },
      ],
    },
  ];
}
